package com.yuanfengPlus.purchase.controller;



import com.yuanfengPlus.purchase.entity.PurchaseReceipt;
import com.yuanfengPlus.purchase.service.IPurchaseReceiptService;
import com.yuanfengPlus.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping(value = "/purchaseReceipt")
public class PurchaseReceiptController {
    @Autowired
    private IPurchaseReceiptService iprs;
    @GetMapping("/queryPurchaseReceipt")
    public Result<List<PurchaseReceipt>> queryPurchaseReceipt(@RequestBody Map<String, Object> params){
        return iprs.queryPurchaseReceipt(params);
    }
    @PostMapping("/addPurchaseReceipt")
    public Result<String> addPurchaseReceipt(@RequestBody PurchaseReceipt purchaseReceipt){
        return iprs.addPurchaseReceipt(purchaseReceipt);
    }
    @PostMapping("/deletePurchaseReceipt")
    public Result<String> deletePurchaseReceipt(String purchase_receipt_id){
        return iprs.deletePurchaseReceipt(purchase_receipt_id);
    }
    @GetMapping("/queryPurchaseReceiptById")
    public Result<PurchaseReceipt> queryPurchaseReceiptById(@RequestBody String purchase_receipt_id){
        return iprs.queryPurchaseReceiptById(purchase_receipt_id);
    }
    @PostMapping("/updatePurchaseReceiptById")
    public Result<String> updatePurchaseReceiptById(@RequestBody PurchaseReceipt purchaseReceipt){
        return iprs.updatePurchaseReceiptById(purchaseReceipt);
    }
    @PostMapping("/updatePurchaseReceiptAgree")
    public Result<String> updatePurchaseReceiptAgree(String purchase_receipt_id){
        return iprs.updatePurchaseReceiptAgree(purchase_receipt_id);
    }
    @PostMapping("/updatePurchaseReceiptRefuse")
    public Result<String> updatePurchaseReceiptRefuse(String purchase_receipt_id){
        return iprs.updatePurchaseReceiptRefuse(purchase_receipt_id);
    }

}
